projects
/
gtk4.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
c118e51
)
popover: Ensure there is a child before focusing it
author
Carlos Garnacho
<carlosg@gnome.org>
Sat, 13 Dec 2014 16:05:56 +0000
(17:05 +0100)
committer
Carlos Garnacho
<carlosg@gnome.org>
Sat, 13 Dec 2014 16:11:25 +0000
(17:11 +0100)
Fixes a warning in empty popovers being shown.
gtk/gtkpopover.c
patch
|
blob
|
history
diff --git
a/gtk/gtkpopover.c
b/gtk/gtkpopover.c
index ef2badcbecc4b47df3fa6184c776f0b93f195925..a3a190222de2db2d199109356a404ec74d8fca12 100644
(file)
--- a/
gtk/gtkpopover.c
+++ b/
gtk/gtkpopover.c
@@
-1254,9
+1254,13
@@
gtk_popover_key_press (GtkWidget *widget,
static void
gtk_popover_grab_focus (GtkWidget *widget)
{
+ GtkWidget *child;
+
/* Focus the first natural child */
- gtk_widget_child_focus (gtk_bin_get_child (GTK_BIN (widget)),
- GTK_DIR_TAB_FORWARD);
+ child = gtk_bin_get_child (GTK_BIN (widget));
+
+ if (child)
+ gtk_widget_child_focus (child, GTK_DIR_TAB_FORWARD);
}
static gboolean